import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
	state: {
		hasLogin:false,
		userInfo:'',
		contact:"",
		todayIsSign:false,
		initialize:'',
		cos:'',
		cosBucket:'',
		cosRegion:'',
		currentCity:{label:'',value:''},
		scene:'',
		postUser:'',
		task:'',
		qcloudSts:''
	},
	mutations: {
		setInitialize(state, initialize) {
			state.initialize = initialize;
		},
		setLogin(state, hasLogin) {			
			state.hasLogin = hasLogin;
		},
		setUserInfo(state, user_info) {
			state.userInfo = user_info
		},
		setContact(state, contact) {
			state.contact = contact;
		},
		setTodayIsSign(state, todayIsSign) {
			state.todayIsSign = todayIsSign;
		},
		setCos(state, cos) {
			state.cos = cos;
		},
		setCosBucket(state, cosBucket) {
			state.cosBucket = cosBucket;
		},
		setCosRegion(state, cosRegion) {
			state.cosRegion = cosRegion;
		},
		setCurrentCity(state, currentCity) {
			state.currentCity = currentCity
		},
		setScene(state, scene) {
			state.scene = scene
		},
		setPostUser(state, postUser) {
			state.postUser = postUser
		},
		setTask(state, task) {
			state.task = task
		},
		setQcloudSts(state, qcloudSts) {
			state.qcloudSts = qcloudSts
		}
	}
})

export default store
